<%--
  Created by IntelliJ IDEA.
  User: KangWang
  Date: 2021/5/14
  Time: 9:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta username="viewport" content="width=device-width, initial-scale=1.0">
    <title>联系我们</title>
    <link rel="shortcut icon" href="https://static.websiteonline.cn/website/template/default/images/favicon.ico"
          type="image/x-icon" />
    <link rel="Bookmark" href="https://static.websiteonline.cn/website/template/default/images/favicon.ico" />
    <!-- 引入外部css -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/home.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/company_profile.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/news_and_trends.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/online_message.css" type="text/css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/contact_us.css" type="text/css" />
    <link rel="stylesheet" href="//api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
    <!-- head-and-foot -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/head.css" type="text/css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/foot.css" type="text/css">
    <!-- 百度地图 -->
    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=iUfBXbdEZaW55iYy4ynxs79TrkbPylKW"></script>
    <script type="text/javascript" src="//api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
</head>

<body>
<!-- head 公共部分 -->
<%--<script src="${pageContext.request.contextPath}/js/head.js"></script>--%>
<jsp:include page="head.jsp"></jsp:include>
<!-- 联系我们 -->
<div class="companyBrief">
    <div>
        <div class="buttons_content" style="height: 30px;width: 800px;">
            <!-- 斜线 -->
            <div>
                <div>
                    <div></div>
                </div>
            </div>
            <a href="javascript:;">\ 联系我们</a>
        </div>
        <div class="buttons_1content">
            <div>
                <a href="javascript:;">
                    <img src="${pageContext.request.contextPath}${images[8].imgUrl}" />
                </a>
            </div>
        </div>
    </div>
</div>
<!-- 地图 -->
<div class="contact-map">
    <div>
        <div class="contact-site">
            <div>
                <p>
                    地址：${contactUs.usSite}
                </p>
                <p>
                    电话：${contactUs.usPhone}
                </p>
                <p>
                    传真：${contactUs.usFax}
                </p>
                <p>
                    邮箱：${contactUs.usEmail}
                </p>
                <p>
                    网址：${contactUs.usUrl}
                </p>
            </div>
        </div>
        <div class="map">
            <div id="container" class="container"></div>
        </div>
    </div>
</div>
<!--回到顶部 公共部分 -->
<jsp:include page="href-top.jsp"></jsp:include>
<!-- 分割线 -->
<div style="margin-top: 420px;">
    <hr />
</div>
<!-- foot -->
<div class="company-end" style="margin-top: 1238px;">
    <%--   foot-nav 公共部分 --%>
    <jsp:include page="foot.jsp"></jsp:include>
</div>
</body>

</html>
<%--创建百度地图--%>
<script>
    var map = new BMapGL.Map('container'); // 创建Map实例
    var point = new BMapGL.Point(104.066443, 30.57935);
    map.centerAndZoom(point, 18); // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
    // 添加标记
    var marker = new BMapGL.Marker(point); //创建marker对象
    marker.enableDragging(); //marker可拖拽
    map.addOverlay(marker); //在地图中添加marker
    var opts = {
        width : 200,     // 信息窗口宽度
        height: 100,     // 信息窗口高度
        title : "万息科技", // 信息窗口标题
    }
    var infoWindow = new BMapGL.InfoWindow("地址：益州大道北段1599号<br />坐标：104.066443,30.57935", opts);  // 创建信息窗口对象
    marker.addEventListener("click", function(){
        map.openInfoWindow(infoWindow, point); //开启信息窗口
    });
</script>
